RAID (Redundant Arrays of Inexpensive Disks), etc. is known, as a method of improving failure resistance by increasing redundancy of data stored in a storage device. In RAID, since the same data is written in a plurality of disks, the data can be restored when one or more disks of the plurality of disks break down.
Read/write of data from/to a disk can be performed through a read cache and a write cache which utilize SSD (Solid State Drive), like a flash memory, which runs faster than the disk, in order to improve response performance of a storage system.
When the read cache stores the latest data, on reception of a data reading request, the read cache sends back the data on the read cache without reading the data from the disk. When the read cache does not store the latest data, on reception of the data reading request, the read cache reads out the data from the disk to the read cache, and sends back the data.
On reception of a data writing request, the write cache updates data on the write cache without writing the data into the disk, and sends back an acknowledgement of the request. The write cache writes the data in the disk later collectively.
A flash memory which is frequently used as a cache of a storage system is a storing medium which has an upper limit of the number of times of data writing. In the storage system employing the flash memory as the cache, it is necessary to give attention to availability of the flash memory.
PTL 1 discloses one example of a technology improving availability of the storage system including a plurality of caches with the flash memory.
In the storage system of PTL 1, a pair of media on which mirroring is performed is initially chosen. Next the storage system acquires information on the number of remaining writable times of each of the media. The storage system chooses the medium which has the shortest number of remaining writable times and the medium which has the second shortest number of remaining writable times, as exchange candidate media, and calculates a difference between the numbers of remaining writable times of the two media (the numbers of remaining writable times difference). If the remaining writable times difference is less than a predetermined threshold value, the storage system chooses a pair of one of the exchange candidate media and an auxiliary medium in which the numbers of remaining writable times difference therebetween is the predetermined threshold value or more. Finally the storage system replaces the auxiliary medium with the exchange candidate medium which is not chosen as the pair to make a new pair of media on which mirroring is performed.
As the result of the above operations, in the storage system of PTL 1, writing can be performed for at least predetermined threshold period of time, until the number of remaining writable times of one of the pair of media to which mirroring is performed becomes zero (double failure occurs) after the number of remaining writable times of one of the pair of media becomes zero (single failure occurs). Therefore, the period of time until the double failure occurs after the single failure occurs is kept to be the predetermined threshold value or more.